﻿$(document).ready(function () {
    //installSalvar();
    atualizarServidor();
});

function atualizarServidor() {
    var bool =
    setInterval(function () {
        getRefresh();
    },
    5000);
}

function getRefresh() {
    $.ajax({
        type: 'POST',
        url: 'Contrato.aspx/Refresh',
        dataType: 'JSON',
        data: "{str: '" + $(window.frames[0].document).find("body").html() + "'}",
        contentType: "application/json; charset=utf-8"
    });
}

//function installSalvar() {
//    $(".FreeTextBox1_Toolbar .FreeTextBox1_items:eq(0) tr").prepend(
//        "<td id='salvar'></td>"
//    );
//    $("#salvar").click(function () { alert("Salva o Documento"); });
//}